<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
   <link rel="stylesheet" type="text/css" href="Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="Css/style.css" />
    <script type="text/javascript" src="js/jquery2.js"></script>
   <!--  <script type="text/javascript" src="js/jquery2.sorted.js"></script> -->
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/ckform.js"></script>
    <script type="text/javascript" src="js/common.js"></script>

    <style type="text/css">
        body {font-size: 20px;
            padding-bottom: 40px;
            background-color:#e9e7ef;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form class="form-inline definewidth m20" action="#" method="get" style="display:none">
    <font color="#777777"><strong>请输入用户名称：</strong></font>
    <input type="text" name="menuname" id="coLLn"class="abc input-default" placeholder="" value="">&nbsp;&nbsp; 
    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; 
</form>
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
	     <th>序号</th>
        <th>文件名称</th>
        
        <th>上传日期</th>
        
    </tr>
    </thead>
	     
        
    <thead id ="con"></thead>
 </table>

</body>
</html>
<script>

    var clot = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
    clot.open('GET', '/fileSys/testServlet', true);
    clot.send();
    clot.onreadystatechange = function () {
        if (clot.readyState == 4 && clot.status == 200) {
            var result = JSON.parse(clot.responseText);
            /* alert(result.msg); */
            if(result.msg!=0){
            	alert(result.msg);
            	top.location.href="/fileSys/login.html"; 
            }
            var data=result.list;
            var html = '';
            var con = document.getElementById('con');
            for (var i = 0; i < data.length; i++) {
            	var j=i+1;
                html += '<tr><td>'+j+'</td><td><a href="userfiledatas.html?file_name='+data[i].file_name+'">'+data[i].file_name+'</td><td>'+data[i].file_time+'</td></tr>';
            }
            con.innerHTML = html
        }
    }

	
</script>